public class Solution {
    public class TreeNode{
        TreeNode left = null;
        TreeNode right = null;
        int val = 0;
        public TreeNode(int val){
            this.val = val;
        }
    }


    //操作给定的二叉树，将其变换为源二叉树的镜像。
    public TreeNode Mirror (TreeNode pRoot) {
        if(pRoot == null){
            return null;
        }
        TreeNode tmp = new TreeNode(0);
        tmp = pRoot.left;
        pRoot.left = pRoot.right;
        pRoot.right = tmp;
        Mirror(pRoot.left);
        Mirror(pRoot.right);
        return pRoot;
    }

}
